<#import "/ftl/mainAdmin.ftl" as page>

<@page.mainTemplate styleSheet="comtemuserCss" jsFile="comtemuserJs" current="公司用户">
	 <!-- BEGIN CONTENT BODY -->
            <div class="page-content">
            <!-- BEGIN PAGE HEAD-->
		        <div class="page-head">
		            <!-- BEGIN PAGE TITLE -->
		                <div class="page-title">
		                    <h1>编辑公司用户
		                        <small>编辑公司用户页面</small>
		                    </h1>
		                </div>
		            <!-- END PAGE TITLE -->
		        </div>
		        <!-- END PAGE HEAD -->
                <!-- BEGIN PAGE BREADCRUMB -->
                <ul class="page-breadcrumb breadcrumb">
                	<li>
		                <a href="${context}/base/index_ftl">首页</a>
		                <i class="fa fa-circle"></i>
		            </li>
                    <li>
                        <span class="active">公司用户</span>
                    </li>
                </ul>
                <!-- END PAGE BREADCRUMB -->
                <!-- BEGIN PAGE BASE CONTENT -->
                <div class="row">
                        <div class="portlet-body form edit-form">
                            <form action="javascript:;" class="horizontal-form createform add-company-user" id="addCom" >
                                <input type="hidden" id="id"  name="id" value="${mComConsumerVO.id}">
                                <input type="hidden" id="viewStatus" name="viewStatus" value="${view}">
                                <div class="form-body">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">用户ID</label>
                                                    <div class="input-group-content">
                                                    	<input type="text" id="consumer_code" class="form-control" placeholder="用户ID" name="consumer_code" value="${mComConsumerVO.consumer_code}" readonly>
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">用户名称</label>
                                                	<div class="input-group-content">
                                                    	<input type="text" id="consumer_name" class="form-control" placeholder="★用户名称" name="consumer_name" value="${mComConsumerVO.consumer_name}" readonly>
					                                </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">用户类别</label>
                                                    <div class="input-group-content">
                                                    	 <select class="form-control input-inline" name="consumer_type" >
						                                    <option value="">★请选择</option>
						                                    <option <#if mComConsumerVO.consumer_type == 'CONSUMER_WAGE'> selected</#if> value="CONSUMER_WAGE">工资户</option>
						                                    <option <#if mComConsumerVO.consumer_type == 'CONSUMER_MERCHANT'> selected</#if> value="CONSUMER_MERCHANT">商户</option>
						                                    <option <#if mComConsumerVO.consumer_type == 'CONSUMER_COMPREHEN'> selected</#if> value="CONSUMER_COMPREHEN">综合户</option>
						                                    <option <#if mComConsumerVO.consumer_type == 'CONSUMER_MANAGER'> selected</#if> value="CONSUMER_MANAGER">管理员</option>	
						                                </select>
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">办公电话</label>
                                                    <div class="input-group-content">
                                                    	<input type="text" id="office_tel" class="form-control" placeholder="★办公电话" name="office_tel" value="${mComConsumerVO.office_tel}"> 
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">联系人</label>
                                                    <div class="input-group-content">
                                                    	<input type="text" id="" class="form-control" placeholder="★联系人" name="contacts" value="${mComConsumerVO.contacts}">
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">移动电话</label>
                                                    <div class="input-group-content">
                                                    	<input type="text" id="mobile_tel" class="form-control" placeholder="★移动电话" name="mobile_tel" value="${mComConsumerVO.mobile_tel}">
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                    </div>
                                    <div class="row">
                                    	<div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">E-mail</label>
                                                    <div class="input-group-content">
                                                    	<input type="text" id="email" class="form-control" placeholder="★E-mail" name="email" value="${mComConsumerVO.email}">
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">建立日期</label>
                                                    <div class="input-group-content">
					                                   <!-- <div class="input-group">-->
					                                        <input type="text" class="form-control" readonly="readonly" id="start-time" name="create_time" value="${mComConsumerVO.dateToString(mComConsumerVO.create_time)}">
				                                    	<!--</div>-->
					                                </div>
                                                </div>
                                            </div>
                                        </div>
                                        <!--/span-->
                                    </div>
                                    <div class="row">
                                    	<div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">所属公司</label>
                                                    <#--<input type="text" id="company_name" class="form-control" placeholder="★所属公司" name="company.company_name" value="${mComConsumerVO.company.company_name}">-->
                                                    <div class="input-group-content">
                                                        <select class="form-control input-inline" placeholder="★请输入所属公司" name="company_id" id="comID" ><#--name="company.companyName" value="${userVO.company.companyName} -->
						                                	<option value="${mComConsumerVO.company_id}">${mComConsumerVO.company.company_name}</option>
						                                </select>
					                                </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">用户状态</label>
                                                    <div class="input-group-content">
                                                    	 <select class="form-control input-inline" name="data_status" >
						                                    <option <#if mComConsumerVO.data_status == ''> selected</#if> value="">请选择</option>
						                                    <option <#if mComConsumerVO.data_status == 'DATA_AVAILABLE'> selected</#if> value="DATA_AVAILABLE">启用</option>
						                                    <option <#if mComConsumerVO.data_status == 'DATA_DISABLE'> selected</#if> value="DATA_DISABLE">停用</option>						                                    
						                                </select>
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-offset-5 col-md-7">
                                            <button type="submit" class="btn green" id="comSave"><#if mComConsumerVO.id=="">下一步<#else>保存</#if></button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                            <div class="horizontal-form createform col-md-12 <#if mComConsumerVO.id=="">hide</#if>" id="comRoleWrap" >
                                <h4 class="form-section">管理公司及角色</h4>
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="form-group col-md-8 col-md-offset-2">
                                            <div class="input-group">
                                                <label class="input-group-addon">选择公司机构</label>
                                                <div class="input-group-content">
                                                    <select class="form-control input-inline" name="companyManage">
                                                        <option value="">请选择</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group col-md-8 col-md-offset-2">
                                            <ul class="list-group" id="comapnyList">
                                            	<#list mComConsumerVO.company_list as list>
	                                                <li class="list-group-item" data-id="${list.id}"> ${list.company_name}
	                                                    <span class="pull-right ">
	                                                        <a class="btn btn-xs btn-primary" name="manage">管理权限</a> 
	                                                        <a class="btn btn-xs red" name="delete">删除</a> 
	                                                    </span>
	                                                </li>
                                                </#list>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="row" style="text-align:center;">
                                        <a class="btn green" id="orgSave">保存</a>
                                        <a href="${context}/companyconsumer/query_company_consumer_view"class="btn default">返回</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- END CONTENT BODY -->

</@page.mainTemplate>